/*
 * All rights Reserved, Designed By www.goldbeacon.cn
 * @Title:  demo-springboot
 * @Package com.chenzhengrong.demospringboot.manager.impl
 * @author: chenzhengrong
 * @date:   2022/8/19 13:58
 * @version V1.0
 * Copyright © 2022 www.goldbeacon.cn. All Rights Reserved.
 * 注意：本内容仅限于湖南金烽信息科技有限公司内部传阅，禁止外泄以及用于其他的商业目
 */
package com.chenzhengrong.demospringboot.manager.impl;

import com.chenzhengrong.demospringboot.domain.dto.OperateLogDTO;
import com.chenzhengrong.demospringboot.domain.dto.RegionDTO;
import com.chenzhengrong.demospringboot.manager.OperatelogManager;
import com.chenzhengrong.demospringboot.service.OperatelogService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;

import java.util.List;

/**
 * @author chenzhengrong
 * @title: OperatelogManagerImpl
 * @description: TODO
 * @date 2022/8/19 13:58
 */
@Service
@Slf4j
public class OperatelogManagerImpl implements OperatelogManager {

    @Autowired
    private OperatelogService operatelogService;

    @Override
    public void batchInsert(List<OperateLogDTO> list) {
        if (!CollectionUtils.isEmpty(list)) {
            for (OperateLogDTO operateLogDTO : list) {
                log.info("regionDTO：{}", operateLogDTO);
                operatelogService.logInsert(operateLogDTO);
            }
        }
    }
}
